<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串转换</title>
</head>
<body>
    <script>
        var num = 123;
        console.log(typeof String(num));// 强转
        console.log(typeof num.toString());
        console.log(typeof (num + ''));// 字符串拼接
    </script>
</body>
</html>